﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace FieldDevice.UI
{
    public partial class ColorPanel : UserControl
    {
        public ColorPanel()
        {
            InitializeComponent();   
        }
       public Color panelColor;
        [Category("ColorPanel"), Description("选择的颜色")]
        public Color PanelColor
        {
            get{return panelColor;}
            set
            {
                panelColor = value;
                this.Refresh();
            }
        }

        private void pictureBox_Paint(object sender, PaintEventArgs e)
        {
            Pen pen = new Pen(PanelColor,2);
            e.Graphics.DrawLine(pen, 0, this.Height / 2, this.Width, this.Height / 2);
        }
    }
}
